﻿﻿

<!--********************* Part1:Jsp Head *********************-->

<%@page import="com.hitrust.gs.util.date.DateUtil"%>

<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/framework/head.jsp"%>
<%@ page import="com.hitrust.gs.lib.GSAutoAuditongDateConfigurator"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.ArrayList"%>

<!--********************* Part2:Java Code *********************-->
<%
	OperateRecordSearchEvent event = (OperateRecordSearchEvent) context
				.getSessionValue("ProductCreateSearchEvent");
	event.setOrderField("operate_time");
	event.setOrderDesc(true);
	ObjectList list = OperateRecord.fetch().search(con, event);
%>
<%@ page import="com.hitrust.gs.service.*"%>
<!--********************* Part3:JavaScript Code ***************-->
<!--start 客户端脚本区域-->
<%@page import="system.LoginContext"%>


<script language=javascript>
var list_code = "listProductCreate";
function doSearch()
{
    SetValue("s_ConcentricityCode",GetValue("i_ConcentricityCode")); //集中编码
    SetValue("s_ProductName",GetValue("i_ProductName")); //产品名称
    SetValue("s_Spec",GetValue("i_Spec")); //规格
    SetValue("s_Model",GetValue("i_Model")); //型号
    SetValue("s_ProductBrand",GetValue("i_ProductBrand")); //品牌
    SetValue("s_ProviderCode",GetValue("i_ProviderCode")); //供应商
    SetValue("s_DrawingPieceCode",GetValue("i_DrawingPieceCode")); //图件号
    SetValue("s_EnabledTimeStart",GetValue("i_EnabledTimeStart")); //创建日期(开始)
    SetValue("s_EnabledTimeEnd",GetValue("i_EnabledTimeEnd")); //创建日期(结束)
    doCommonSearch();
}

function doExcel(){
    <%if (list.getTotalSize() > 20000) {%>
        alert("导出EXCEL产品数量不能超过20000条！");
        return false;
    <%} else {%>
        window.location.href="<%=Config.getWebPath()%>/GSproductCreateDown";
    <%}%>
}

key_InitDefault();
key_RegSubmitHandler(doSearch);


</script>
<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->
<form id=frm name='pager' action="<%=Config.getSrv()%>" method="post">
<input type="hidden" name='indexs'>
<input type="hidden" name='confirmorreject'>
<input type=hidden name="action_code" value=""> <input type=hidden
	name="Id" value=""> <input type=hidden name=sortOrder value="">
 <input type=hidden name="s_ConcentricityCode"
	value="<%=event.getConcentricityCode()%>"> <!--集中编码-->
 <input type=hidden name="s_ProductName"
	value="<%=event.getProductName()%>"> <!--产品名称--> <input
	type=hidden name="s_Spec" value="<%=event.getSpec()%>"> <!--规格-->
<input type=hidden name="s_Model" value="<%=event.getModel()%>">
<!--型号--> 
<input
	type=hidden name="s_ProductBrand" value="<%=event.getProductBrand()%>"> <!--品牌-->
 <input type=hidden name="s_ProviderCode"
	value="<%=event.getProviderCode()%>"><!--供应商--> <input
	type=hidden name="s_DrawingPieceCode"
	value="<%=event.getDrawingPieceCode()%>"> <!--图件号--> 
<input type=hidden name="s_Status"
	value="<%=event.getStatus()%>"> <!--是否执行-->
<input type=hidden name="s_AuditingStatus"
	value="<%=event.getAuditingStatus()%>"> <!--状态--> 
<input type=hidden name="s_EnabledTimeStart"
	value="<%=event.getEnabledTimeStart()%>"> <!--创建日期(开始)-->  
<input type=hidden name="s_EnabledTimeEnd"
	value="<%=event.getEnabledTimeEnd()%>"> <!--创建日期(结束)-->  

<%@ include file="/framework/list_head.jsp"%> <br>
<!--********************* Part5:Search Area ***************--> <%=uiSearchStart%>>
<%
 	int key_tab = 1;
 %> 
 <%=uiSearchInputTR%>> <%=uiSearchInputTR%>> <%=uiSearchInputTDHead%>>
创建日期：&nbsp;&nbsp;    
 <%=framework.custom.UIManager.generateDateInput("i_EnabledTimeStart", event.getEnabledTimeStart())%>
    ～<%=framework.custom.UIManager.generateDateInput("i_EnabledTimeEnd", event.getEnabledTimeEnd())%>
    &nbsp;&nbsp;  品牌：&nbsp;&nbsp;
     <input type="text" class="texts" name="i_ProductBrand" size="20"
	value="<%=event.viewProductBrand()%>" key_tab="<%=key_tab++%>">
</td>
</tr>
 <%=uiSearchInputTR%>><%=uiSearchInputTDHead%>> 集中编码：&nbsp;&nbsp; <input type="text"
	class="texts" name="i_ConcentricityCode" size="20"
	value="<%=event.viewConcentricityCode()%>" key_tab="<%=key_tab++%>">
&nbsp;&nbsp;&nbsp;&nbsp;产品名称：&nbsp;&nbsp;&nbsp;&nbsp; <input type="text"
	class="texts" name="i_ProductName" size="20" value="<%=event.viewProductName()%>"
	key_tab="<%=key_tab++%>">
</td>
</tr>
 <%=uiSearchInputTR%>><%=uiSearchInputTDHead%>> 
	规&nbsp;&nbsp;&nbsp;&nbsp;格：&nbsp;&nbsp;
<input type="text" class="texts" name="i_Spec" size="20"
	value="<%=event.viewSpec()%>" key_tab="<%=key_tab++%>">
&nbsp;&nbsp;&nbsp;&nbsp;型&nbsp;&nbsp;&nbsp;&nbsp;号：&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" class="texts"
	name="i_Model" size="20" value="<%=event.viewModel() %>"
	key_tab="<%=key_tab++%>">

</td>
</tr>
<%=uiSearchInputTR%>> <%=uiSearchInputTDHead%>>
图&nbsp;件&nbsp;号：&nbsp;&nbsp; <input
	type="text" class="texts" name="i_DrawingPieceCode" size="20"
	value="<%=event.viewDrawingPieceCode() %>" key_tab="<%=key_tab++%>">
&nbsp;&nbsp;&nbsp;&nbsp;供&nbsp;应&nbsp;商：&nbsp;&nbsp;&nbsp;&nbsp;  <input type="text" class="texts"
	name="i_ProviderCode" size="20" value="<%=event.getProviderCode()%>"
	key_tab="<%=key_tab++%>">
	<input type="button" value="查询" class="buttons"
	onclick="doSearch();return false;"><input type="button"
	value="清空" class="buttons" onclick="doClearEvent();return false;">
</td>

<%=uiSearchEnd%> <!--列表标题--> <%=UIManager.addListHeadTitle("产品新增列表")%> <!--********************* Part6:List Area ***************-->

<%=uiListStart%>> <%@ include file="/framework/list_foot.jsp"%>

<%
	int index = 1;
%> <%=uiListHeadTR%>> 
<%=UIManager.addListHeadCheckBox()%> 
<%=UIManager.addListHead("集中编码", index++)%>
<%=UIManager.addListHead("产品名称", index++)%> 
<%=UIManager.addListHead("区域", index++)%> 
<%=UIManager.addListHead("规格", index++)%>
<%=UIManager.addListHead("型号", index++)%> 
<%=UIManager.addListHead("品牌", index++)%> 
<%=UIManager.addListHead("图件号", index++)%>
<%=UIManager.addListHead("供应商", index++)%>
<%=UIManager.addListHead("创建人", index++)%>
<%=UIManager.addListHead("创建时间", index++)%>


<%=uiListHeadTREnd%>> <!--data-->


 <%
 	for (int i = 0; i < list.size(); i++) {
 			OperateRecord obj = (OperateRecord) list.get(i);
 %> <%=uiListDataTR[i % 2]%> align=center> 

  <%=uiListDataTD%>> 
 <input
	type="checkbox" name="ids" value="<%=obj.getId()%>">
</td>

<%
	Product cmd = Product.fetch(con,
					obj.getRecordId());
	ProductType ptype = ProductType.fetchByProductId(con,
					cmd.getId());
%>
<%=uiListDataTD%>><%=cmd.viewConcentricityCode(con)%></td>
<%=uiListDataTD%>><%=cmd.viewName(con)%></td>
<%=uiListDataTD%>><%=ptype == null ? "" : com.hitrust.gs.util.DefineDic
							.getProductType(ptype.getProductType() + "")%></td>
<%=uiListDataTD%>><%=cmd.viewSpec(con)%></td>
<%=uiListDataTD%>><%=cmd.viewModel(con)%></td>
<%=uiListDataTD%>><%=cmd.viewProductBrand(con)%></td>
<%=uiListDataTD%>><%=cmd.viewDrawingPieceCode(con)%></td>
<%=uiListDataTD%>><%=cmd.viewProviderCode(con)%></td>
<%=uiListDataTD%>><%=cmd.viewCreateUser(con)%></td>
<%=uiListDataTD%>><%=obj.getOperateTime()%></td>
</tr>
<%
	}
%> <%@ include file="/framework/list_foot2.jsp"%>

<%=uiListEnd%> <!--********************* Part7:Action Area ***************-->
<%=uiCommandStart%>> <%=uiCommandTR%>> <%=uiCommandTD%>>

<input type=button value="　　导出EXCEL　　" class="buttons"
	onclick="doExcel();return false;">
</td>
</tr>
<%=uiCommandEnd%></form>
<script language=javascript>

</script>
<%@ include file="/framework/foot.jsp"%>

<!--
    Author    :chengbiao.he
    FileName  :/system/base/ProductList.jsp
-->
